#!/bin/bash
# script name: CPU 详细信息查看
# author: subushi
# update date: 2023.07.07

echo -e "\033[1;42;37m cpu型号 \033[0m"
cat /proc/cpuinfo | grep 'name' | cut -f2 -d: |uniq

echo -e "\033[1;42;37m 核心个数 \033[0m"
cat /proc/cpuinfo| grep 'cpu cores' | cut -f2 -d: | uniq

echo -e "\033[1;42;37m 逻辑cpu个数 \033[0m"
cat /proc/cpuinfo| grep 'processor' | wc -l

echo -e "\033[1;42;37m 物理cpu个数 \033[0m"
cat /proc/cpuinfo| grep 'physical id' | sort | uniq | wc -l

echo -e "\033[1;42;37m 内存信息 \033[0m"
free -h
